/*
 *
 *  * Copyright (c) 2016. For Intelligent Group.
 *
 */

package com.intelligent.mts.client.ex;

import javax.swing.*;
import java.awt.event.MouseEvent;

/**
 * Created by Peter on 2016/7/30.
 */
public class JTableEx extends JTable {

    @Override
    public String getToolTipText(MouseEvent e) {
        int row = this.rowAtPoint(e.getPoint());
        int col = this.columnAtPoint(e.getPoint());
        String tiptextString = null;
        if (row > -1 && col > -1) {
            Object value = this.getValueAt(row, col);
            if (null != value && !"".equals(value))
                tiptextString = value.toString();
        }
        return tiptextString;
    }
}
